package org.cuatrovientos.erp.business;


import java.util.List;

import org.cuatrovientos.erp.dao.DepartmentDAO;
import org.cuatrovientos.erp.model.Department;
import org.apache.log4j.Logger;
/**
 * 
 * @author CARLOS
 *
 */

public class DepartmentBO implements DepartmentBOInterface {

	// Get log4j logger
	private static final Logger logger = Logger.getLogger(DepartmentBO.class);
	private DepartmentDAO departmentDAO;
	@Override
	public Department selectById(int id) {
		// TODO Auto-generated method stub
		logger.info("selectById: " + id);
		return departmentDAO.selectById(id);
	}

	@Override
	public List<Department> selectAll() {
		return departmentDAO.selectAll();
	}

	@Override
	public List<Department> search(String name) {
		return departmentDAO.search(name);
	}

	@Override
	public void deleteById(int id) {
		// TODO Auto-generated method stub
		departmentDAO.deleteById(id);
	}

	@Override
	public void insert(Department department) {

		departmentDAO.insert(department);
	}

	@Override
	public void update(Department department) {

		departmentDAO.update(department);
	}

}
